phi function 通常指欧拉函数 / 欧拉φ函数(Euler’s totient function),记作 **φ(n)**:表示在 1 到 n 之间与 n 互质(最大公因数为 1)的正整数个数。(在不同语境中也可能泛指“用希腊字母 φ 表示的函数”,但最常见的是欧拉函数。)
/faɪ ˈfʌŋkʃən/
φ(9) = 6 because 1, 2, 4, 5, 7, and 8 are coprime to 9.
φ(9)=6,因为 1、2、4、5、7、8 都与 9 互质。
The phi function plays a central role in modular arithmetic, especially in Euler’s theorem: if gcd(a, n)=1, then a^{φ(n)} ≡ 1 (mod n).
φ函数在模运算中很关键,尤其在欧拉定理里:若 gcd(a,n)=1,则 a^{φ(n)} ≡ 1(mod n)。
“phi” 来自希腊字母 φ(phi),数学中常用希腊字母给重要对象命名;欧拉用 φ(n) 表示这一“计数互质个数”的算术函数,因此在英语里常被称为 phi function,更正式的名称是 Euler’s totient function。